/**
 * Hunan Jiao Tai Technology Co., Ltd.
 * The code belongs to the company and can not be used in other ways
 * Created by the company's technical personnel.
 * Ownership is the responsibility of the company's technology department.
 **/

package com.shop.common.enums.user;

import lombok.Getter;

import java.io.Serializable;

/**
 * 提现状态 -1 未通过 0 审核中 1 已提现
 *
 **/
@Getter
public enum ExtractStatusEnum implements Serializable {

    FAIL(-1, "退款中"),
    ING(0, "审核中"),
    PASS(1, "已提现"),
    TRANS_ING(2, "入账中"),
    NEED_QUERY(3, "处理中"),
    REFUND(4, "已退款"),
    ;

    private int key;
    private String name;

    ExtractStatusEnum(int key, String name) {
        this.key = key;
        this.name = name;
    }

    public static ExtractStatusEnum val(int key) {
        for (ExtractStatusEnum enumObj : ExtractStatusEnum.values()) {
            if(enumObj.key == key) {
                return enumObj;
            }
        }
        return null;
    }


}
